package org.pi.common.plot.axes

import org.pi.common.plot.drawables.Drawable

object AxisAdjustment extends Enumeration {
  val Auto = Value
  val Manual = Value
}

object AspectRatio extends Enumeration {
  val Fixed = Value
  val Free = Value
}

trait Axes extends org.pi.common.observerpattern.Observable with org.pi.common.observerpattern.Observer {
  var autoAdjust: AxisAdjustment.Value
  var preserveAspectRatio: AspectRatio.Value
  def paint(graphics: java.awt.Graphics2D)
  def addDrawable(drawable: Drawable)
  def clear
  def getPositionInAxesForGivenPointOnScreen(x: Float, y: Float):(Float, Float)
  def selectPoint(x:Float, y:Float) : Unit
  def selectRegion(x1:Float, y1:Float,x2:Float, y2:Float) : Unit
  def zoom(x1:Float, y1:Float,x2:Float, y2:Float) : Unit
  def resetZoom(): Unit
  def connectToAxes(other: Axes): Unit
}
